package mylab.utils.common.guava;

import com.google.common.eventbus.EventBus;


public class SyncEventUtil {

    @SuppressWarnings("UnstableApiUsage")
    private static EventBus bus;

    static {
        bus = new EventBus("syncBus");
        bus.register(new DeadEventListener());
    }

    public static void register(Object listener) {
        bus.register(listener);
    }

    public static void unregister(Object listener) {
        bus.unregister(listener);
    }

    public static void postEvent(Object event) {
        bus.post(event);
    }
}
